jQuery(function($){
var
$contents = $("#ref-data div.items").hide(),
$selector = $("#ref-data-selector div.selector"),
$current;

$current = $selector.filter(".current");
if( $current.length ){
	$contents.eq( $selector.index($current) ).show();
}else{
	$selector.eq(0).addClass("current");
	$contents.eq(0).show();
}

$selector.each(function(i, elm){
	var
	$c = $contents.eq(i), 
	$this = $(this),
	$notThis = $selector.not($this);
	
	$this.click(function(){
		if ( $c.is(':hidden') ) {
			$notThis.removeClass("current");
			$this.addClass("current");
			$contents.filter(':visible').hide();
			$c.show();
		}
	});
});
});